package com.行为模型.策略模型.原理;

/**
 * 中介用于间接调用策略类
 *
 * @author chenhs
 * @date 2020/11/8
 */
public class Agent {
	private IStrategy strategy;
	
	public Agent(IStrategy strategy) {
		this.strategy = strategy;
	}
	
	public void getMonth() {
		strategy.speak();
	}
	
	public IStrategy getStrategy() {
		return strategy;
	}
	
	public void setStrategy(IStrategy strategy) {
		this.strategy = strategy;
	}
}
